﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UserInfo.ascx.cs" Inherits="Pages_UserInfo" %>
<link rel="stylesheet" type="text/css" href="../Styles/UserInfo.css" />
<table cellspacing="0" border="0" width="200px" class="UserInfoContent">
    <tr>
        <td class="UserInfoHead">
            Ваша информация
        </td>
    </tr>
    <asp:LoginView ID="LoginView1" runat="server">
        <AnonymousTemplate>
            <tr>
                <td>
                    <span class="UserInfoText">Вы ещё не авторизованы.</span>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;&raquo;
                    <asp:LoginStatus ID="LoginStatus1" runat="server" CssClass="UserInfoLink" 
                        LogoutAction="RedirectToLoginPage" />
                    &nbsp;&laquo;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;&raquo;
                    <asp:HyperLink runat="server" ID="registerLink" NavigateUrl="~/Pages/Register.aspx"
                        Text="Регистрация" ToolTip="Go to the registration page" 
                        CssClass="UserInfoLink" />
                    &nbsp;&laquo;
                </td>
            </tr>
        </AnonymousTemplate>
        <RoleGroups>
            <asp:RoleGroup Roles="Customers">
                <ContentTemplate>
                    <tr>
                        <td>
                            <asp:LoginName ID="LoginName1" runat="server" FormatString="Вы авторизованы как <b>{0}</b>. "
                                CssClass="UserInfoText" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;&raquo;
                            <asp:LoginStatus ID="LoginStatus1" runat="server" CssClass="UserInfoLink" />
                            &nbsp;&laquo;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;&raquo;
                            <asp:HyperLink runat="server" ID="detailsLink" NavigateUrl="~/Pages/CustomerDetails.aspx"
                                Text="Редактировать" ToolTip="Edit your personal details" CssClass="UserInfoLink" />
                            &nbsp;&laquo;
                        </td>
                    </tr>
                </ContentTemplate>
            </asp:RoleGroup>
            <asp:RoleGroup Roles="Administrators">
                <ContentTemplate>
                    <tr>
                        <td>
                            <asp:LoginName ID="LoginName2" runat="server" FormatString="You are logged in as <b>{0}</b>. "
                                CssClass="UserInfoText" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;&raquo;
                            <asp:LoginStatus ID="LoginStatus2" runat="server" CssClass="UserInfoLink" />
                            &nbsp;&laquo;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;&raquo; <a class="UserInfoLink" href="CatalogAdmin.aspx">Catalog Admin</a>
                            &nbsp;&laquo;
                        </td>
                    </tr>
                </ContentTemplate>
            </asp:RoleGroup>
        </RoleGroups>
    </asp:LoginView>
</table>
<hr />
